package com.jiyun.home.controller;

import com.jiyun.common.pojo.home.Activity;
import com.jiyun.home.service.ActivityService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/activity")
@CrossOrigin
public class ActivityController {
    @Autowired
    private ActivityService activityService;
    @GetMapping("/findAll")
    public List<Activity> findAll(){
         List<Activity> activityList =activityService.findAll();
         return activityList;
    }
}
